package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlSchemaDefinitionStatement;

/**
 * @author Bright Lee
 */
public final class TransformDefinition implements SchemaElement, SqlSchemaDefinitionStatement {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName schemaResolvedUserDefinedTypeName;
    private TransformGroupList transformGroupList;

    public TransformDefinition(int beginIndex,
                               SchemaQualifiedName schemaResolvedUserDefinedTypeName,
                               TransformGroupList transformGroupList) {
        this.beginIndex = beginIndex;
        this.endIndex = transformGroupList.getEndIndex();
        this.schemaResolvedUserDefinedTypeName = schemaResolvedUserDefinedTypeName;
        this.transformGroupList = transformGroupList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getSchemaResolvedUserDefinedTypeName() {
        return schemaResolvedUserDefinedTypeName;
    }

    public TransformGroupList getTransformGroupList() {
        return transformGroupList;
    }

}
